package com.listeningframework.boot.codegen.exception;

/**
 * CodeGen Exception
 */
public class CodeGenException extends Exception {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    /**
     * 错误编码
     */
    private String errorCode;
    /**
     * 错误描述
     */
    private String errorDesc;

    public CodeGenException(String errorDesc) {
        this(errorDesc, null);
    }

    public CodeGenException(String errorDesc, Throwable t) {
        this(null, errorDesc, t);
    }

    public CodeGenException(String errorCode, String errorDesc, Throwable e) {
        super(errorDesc, e);
        this.errorDesc = errorDesc;
        this.errorCode = errorCode;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorDesc() {
        return errorDesc;
    }
}
